<%- unless uploads.empty? -%>
  <ul>
    <%- deadline = -1 -%>
    <%- uploads.each do |u| -%>
      <%- if deadline != (u.deadline_id || 0) -%>
        <%= (deadline > -1) ? '</ul></li>' : '' %>
        <%- deadline = (u.deadline_id || 0) -%>
        <%= "<li>#{deadline > 0 ? h(u.deadline.title) : _("No deadline assigned")}:<ul>"%>
      <%- end -%>
      <li><%= link_to(h(u.title), upload_path(project, teaching, group, u)) %> (<%= u.created_at.formatted %>)</li>
    <%- end -%>
    <%= (deadline > -1) ? '</ul></li>' : '' %>
  </ul>
<%- else -%>
  <p><%= _('No file has been added, yet.') %></p>
<%- end -%>